<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // cookie的修改     修改密码
        //    直接覆盖   
        document.cookie = 'cc=666' ;


        // cookie的删除   --- 修改有效期  设置一个过期的时间  

        document.cookie = 'cc=666;expires=' + new Date(-1) ;


        console.log(document.cookie);

    </script>
    
</body>
</html>